<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport"
		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no, viewport-fit=cover" />
    <title>呈瑞制氧</title>
    <link rel="stylesheet" href="../css/vant.css">
    <link rel="stylesheet" href="css/infoPage.css">
</head>

<body>
    <div id="app" v-cloak>
        <div class="infoBox">
            <div>
                <div>SELECT AGE GROUP</div>
                <div :class="downFlag1?'specialBox':''">
                    <div>年龄段</div>
                    <input type="text" placeholder="请选择您的年龄段" readonly v-model="age" @click="showHandle(1)" />
                    <div class="sanjiao" v-if="!downFlag1" @click="showHandle(1)"></div>
                    <div class="sanjiao1" v-else @click="showHandle(1)"></div>
                    <div class="classList" v-if="downFlag1">
                        <div v-for="(item,index) in ageList" :key="index" @click="slectHandle(1,index)">{{item.title}}
                        </div>
                    </div>
                </div>
            </div>
            <div>
                <div>QUESTION TYPE</div>
                <div :class="downFlag2?'specialBox':''">
                    <div>问题种类</div>
                    <input type="text" placeholder="请选择您的问题" readonly v-model="selectItem.title"
                        @click="showHandle(2)" />
                    <div class="sanjiao" v-if="!downFlag2" @click="showHandle(2)"></div>
                    <div class="sanjiao1" v-else @click="showHandle(2)"></div>
                    <div class="classList" v-if="downFlag2">
                        <div v-for="(item,index) in list" :key="index" @click="slectHandle(2,index)">{{item.title}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="tobox">
            <div>
                <span>我们的建议</span>
                <span>呈瑞</span>
            </div>
            <div>
                <span v-if="selectItem.minute == ''">
                    如果您填写上述问题，我们将会根据您的身体情况 提供合适的氧疗方案。
                </span>
                <span v-else>
                    建议吸氧{{selectItem.minute}}分钟
                </span>
            </div>
        </div>
        <div class="subBtn" @click="subHandle">立即支付<span>{{selectItem.money}}</span></div>

        <div class="loading" v-if="isShow">
            <img src="../img/load.gif" alt="">
        </div>
    </div>

    <script src="../js/vue.min.js"></script>
    <script src="../js/flex_ible/lib-flexible.js"></script>
    <script src="../js/vue-lazyload.js"></script>
    <script src="../js/vant.min.js"></script>
    <script src="../js/vue-lazyload.js"></script>
    <script src="../js/url.js" type="span/javascript" charset="utf-8"></script>
    <script src="../js/ajax.js"></script>
    <script type="span/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <script>
        Vue.use(VueLazyload);
        var vm = new Vue({
            el: "#app",
            data: {
                isShow: false,
                ageList: [{
                    title: '10~20',
                },
                {
                    title: '20~30',
                },
                {
                    title: '30~40',
                },
                {
                    title: '40~50',
                },
                ],
                list: [{
                    title: '缓解精神紧张',
                    money: '9.9',
                    minute: '10',
                    img1: '../../img/icon1.png',
                    img2: '../../img/icon11.png',
                    isCheck: false,
                    bg: '../../img/bg1.png',

                },
                {
                    title: '提高睡眠质，增加注意力',
                    money: '19.9',
                    minute: '20',
                    img1: '../../img/icon2.png',
                    img2: '../../img/icon22.png',
                    bg: '../../img/bg2.png',
                    isCheck: false,
                }, {
                    title: '养生保健',
                    money: '29.9',
                    minute: '30',
                    img1: '../../img/icon3.png',
                    img2: '../../img/icon33.png',
                    isCheck: true,
                    bg: '../../img/bg3.png',
                }
                ],
                downFlag1: false,
                downFlag2: false,
                age: '',
                selectItem: {
                    title: '',
                    minute: '',
                    money: ''
                }

            },
            created() {

            },
            methods: {
                slectHandle(flag, index) {
                    if (flag == 1) {
                        this.age = this.ageList[index].title
                        this.downFlag1 = false
                        console.log(this.downFlag1);

                    } else {
                        this.selectItem = this.list[index]
                        this.downFlag2 = false
                    }

                },
                showHandle(flag) {
                    if (flag == 1) {
                        this.downFlag1 = !this.downFlag1
                    } else {
                        this.downFlag2 = !this.downFlag2
                    }
                },
                subHandle() {

                    if (this.selectItem.money == '') {
                        this.$toast('请选择问题')
                        return
                    }
                    this.$toast('支付' + this.selectItem.money)

                },

            }
        })
    </script>

</body>

</html>